﻿using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Controller
{
    public class PermissionFormController
    {
        protected PermissionBussiness Controller = new PermissionBussiness();
        public TblPermissionsForm objPermission = new TblPermissionsForm();
        public void AddData()
        {

            Controller.AddData(objPermission);
        }
        public bool DeleteData(int k)
        {
            return Controller.DeleteData(k);
        }

        public void UpdateData()
        {
            Controller.UpdateData(objPermission);
        }

        public List<TblPermissionsForm> GetAllData()
        {
            return Controller.GetAll();
        }

        public List<TblPermissionsForm> GetAllDataByChucVu(int k)
        {
            PermissionBussiness Controller = new PermissionBussiness();
            return Controller.GetAllDataByChucVu(k);
        }

        public bool DeleteDataByPositionID(int k)
        {
            PermissionBussiness Controller = new PermissionBussiness();
            return Controller.DeleteDataByPositionID(k);
        }


    }
}
